// Copyright (c) MatrixFramework. All rights reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Application.Dtos;

namespace PhotoGalleryService.Photos;

/// <summary>
/// 照片搜索输入参数
/// </summary>
public class PhotoSearchInput : PagedAndSortedResultRequestDto
{
    /// <summary>
    /// 关键词（搜索标题、描述、标签）
    /// </summary>
    [StringLength(500)]
    public string? Keyword { get; set; }

    /// <summary>
    /// 标签过滤（逗号分隔）
    /// </summary>
    [StringLength(1000)]
    public string? Tags { get; set; }

    /// <summary>
    /// 拍摄时间开始
    /// </summary>
    public DateTime? TakenDateFrom { get; set; }

    /// <summary>
    /// 拍摄时间结束
    /// </summary>
    public DateTime? TakenDateTo { get; set; }

    /// <summary>
    /// 上传时间开始
    /// </summary>
    public DateTime? CreatedDateFrom { get; set; }

    /// <summary>
    /// 上传时间结束
    /// </summary>
    public DateTime? CreatedDateTo { get; set; }

    /// <summary>
    /// 搜索时间开始（兼容性属性）
    /// </summary>
    public DateTime? StartTime { get; set; }

    /// <summary>
    /// 搜索时间结束（兼容性属性）
    /// </summary>
    public DateTime? EndTime { get; set; }

    /// <summary>
    /// 最小文件大小（字节）
    /// </summary>
    public long? MinFileSize { get; set; }

    /// <summary>
    /// 最大文件大小（字节）
    /// </summary>
    public long? MaxFileSize { get; set; }

    /// <summary>
    /// MIME类型过滤
    /// </summary>
    [StringLength(100)]
    public string? MimeType { get; set; }

    /// <summary>
    /// 是否只显示公开照片
    /// </summary>
    public bool? IsPublic { get; set; }

    /// <summary>
    /// 地理位置范围（纬度中心）
    /// </summary>
    [Range(-90, 90)]
    public double? CenterLatitude { get; set; }

    /// <summary>
    /// 地理位置范围（经度中心）
    /// </summary>
    [Range(-180, 180)]
    public double? CenterLongitude { get; set; }

    /// <summary>
    /// 搜索半径（公里）
    /// </summary>
    [Range(0.1, 1000)]
    public double? SearchRadiusKm { get; set; }

    /// <summary>
    /// 用户ID过滤
    /// </summary>
    public Guid? UserId { get; set; }
}